package com.xinchao.controller;

import com.xinchao.constant.RequestConstant;
import com.xinchao.model.User;
import org.springframework.stereotype.Controller;

import javax.servlet.http.HttpServletRequest;

public class BaseController {
	/**
	 * 获取登录用户
	 */
	public User getSessionUser(HttpServletRequest request) {
		User loginUser = (User) request.getSession().getAttribute(RequestConstant.SESSION_KEY_USER);
		return loginUser;
	}
}
